package com.java.jwt.filter.utils.config;

import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;


/**
 * @author 陈烽
 */
//@Configuration
public class SecurityConfig extends WebSecurityConfigurerAdapter {

//    @Value("${jwt.secret}")
//    private String jwtSecret;


//    private final CustomAccessDeniedHandler customAccessDeniedHandler;

//    @Autowired
//    public SecurityConfig(CustomAccessDeniedHandler customAccessDeniedHandler) {
//        this.customAccessDeniedHandler = customAccessDeniedHandler;
//    }

//    @Bean
//    public JwtAuthenticationFilter getJwtAuthenticationFilter() throws Exception {
//        return new JwtAuthenticationFilter(authenticationManager(), jwtSecret);
//    }
//
//    @Override
//    protected void configure(HttpSecurity http) throws Exception {
//        http.cors().and().csrf().disable().authorizeRequests()
//                .antMatchers("/api/user/login").permitAll()
////                .antMatchers("/api/intention").permitAll()
//                .antMatchers("/api").authenticated()
//                .anyRequest().permitAll()
//                .and()
////                .exceptionHandling().accessDeniedHandler(customAccessDeniedHandler)
////                .and()
//                .addFilter(new JwtAuthenticationFilter(authenticationManager(), jwtSecret));
//    }

}
